package edu.haiu.training.ui;

public class People
{
	private String username;
	private String password;
	
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String execute() throws Exception{
		String s = null;
		for(Users u: Users.values()){			
		    	if(this.password.equals(u.getPassword())&& this.username.equals(u.getUsername())){
		    		s= "Login_successful";
		    		break;
		    	}
		    	else if(this.password.equals(u.getPassword())&& !this.username.equals(u.getUsername())){
		    		s= "Login_unsuccessful";
		    		break;
		    	}
		    	else{
		    		s= "Login_unsuccessful";
		    	}
		}
		return s;
    }
}
